_Pragma("once")

#include <stdint.h>
#include <stdalign.h>
//lizb

/**
*协议头，包含长度和有效数据
*/
//extern "C"{

#pragma pack(push, 1)

typedef struct ProtocolHeader_t {
    uint32_t length;
    uint64_t checkSum;
    uint64_t reserved1;//保留字
    uint8_t payload[];//有效负载，通常为上层数据
} ProtocolHeader_t;


/**
*显示信息，用于显示屏的显示
*/
typedef struct DisplayInfo_t {
    int16_t x;
    int16_t y;
    int16_t width;
    int16_t height;
    uint8_t data[];
} DisplayInfo_t;



typedef struct LightweightHeader_t {
    char beginFlag[2];
    uint16_t length;
    uint16_t reserved1;//保留字
    uint8_t payload[];//有效负载，通常为上层数据
} LightweightHeader_t;


typedef struct DeviceInfoHeader_t {
    uint8_t channel;
    uint8_t payload[];//有效负载，通常为上层数据
} DeviceInfoHeader_t;


typedef  struct FirmwareDataHeader_t{
        uint32_t headTag;
        uint8_t  order;
        uint8_t payload[];
} FirmwareDataHeader_t;

#pragma pack(pop)
//}
